//
//  FPBorrowingAndRepaymentModel.h
//  FinanceProject
//
//  Created by 陈显摆 on 2025/2/11.
//

#import <JSONModel/JSONModel.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger , LoanListType) {
    
    LoanListTypeBorrowing, //!< 借款记录
    LoanListTypeRepayment, //!< 还款记录
};

@interface FPBorrowingAndRepaymentModel : JSONModel

@property (nonatomic , strong) NSString *amount;
@property (nonatomic , strong) NSString *createTime;
@property (nonatomic , strong) NSString *firstRepaymentDate;
@property (nonatomic , strong) NSString *ID;
@property (nonatomic , strong) NSString *interestRate;

@property (nonatomic , strong) NSString *lengthOfMaturity; //!< 借款期限（期数）0.3个月,1.6个月,2.9个月,3.12个月,4.24个月
@property (nonatomic , strong) NSString *loanPurpose; //!< 款用途 O代表日常消费，1代表装修，2代表教育，3代表手机数码，4代表电器，5代表其他
@property (nonatomic , strong) NSString *repaymentMethod;
@property (nonatomic , strong) NSString *repaymentStatus; //!< 还款状态 (0未结清 1已结清）
@property (nonatomic , strong) NSString *status; //!< 借款状态（0代表审核中 1代表已放款 2代表放款失败）

@property (nonatomic , strong) NSString *userBankCardId;
@property (nonatomic , strong) NSString *userId;

@property (nonatomic , strong) NSString *logo;
@property (nonatomic , strong) NSString *productName;


+ (NSString *)termOfParam:(NSString *)param;
+ (NSString *)timeOfParam:(NSString *)param;

+ (void)getLoanListWithType:(LoanListType)type success:(void (^)(NSInteger code , NSString *message , NSArray *list))success failure:(void (^)(NSError *error))failure;




@end

NS_ASSUME_NONNULL_END
